﻿using System.Collections.ObjectModel;

namespace 高级控件演示.Domain
{
    /// <summary>
    /// 绑定导航菜单的实体
    /// </summary>
    public class MenuCategory
    {
        public MenuCategory(string name, string icon,string navigationPath , params MenuCategory[] menuItems)
        {
            Name = name;
            Icon = icon;
            NavigationPath= navigationPath;
            MenuItems = new ObservableCollection<MenuCategory>(menuItems);
            foreach(var menuItem in menuItems)
            {
                menuItem.Parent = this;
            }
        }

        public MenuCategory? Parent { get; set; }

        public string Name { get; set; }

        public string Icon { get; set; }

        public string NavigationPath { get; set; } // 如："IndexView"或"UserView"

        public ObservableCollection<MenuCategory> MenuItems { get; set; }
    }
}
